<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>up6演示页面</title>
    ${pageParam}
    <script type="text/javascript" src="/static/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="/static/js/json2.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/layer-3.1.1/layer.js" charset="utf-8"></script>
    ${up6Header}
    <script language="javascript" type="text/javascript">
        function getQueryVariable(variable){
            var url = window.location.href;
            var str = url.split('?');
            var query = str[1];
            query = decodeURIComponent(query);//解码
            var vars = query.split('&');
            for (var i=0;i<vars.length;i++) {
                var pair = vars[i].split("=");
                if(pair[0] == variable){
                    return pair[1];
                }
            }
            return(false);
        }

        var app = {ui:{panel:$("#FilePanel")}};
        var cbMgr = new HttpUploaderMgr();
        cbMgr.event.md5Complete = function (obj, md5) { /*alert(md5);*/ };
        cbMgr.event.fileAppend = function (obj) { /*alert(obj.pathSvr);*/ };
        cbMgr.event.fileComplete = function (obj) { /*alert(obj.pathSvr);*/ };
        cbMgr.Config.Fields["bucket"] = getQueryVariable("bucket");
        cbMgr.Config.Fields["obskey"] = getQueryVariable("obskey");

        $(function()
        {
            cbMgr.load_to("FilePanel");

            //以弹窗方式打开上传界面
            $("#open-dlg").click(function(){
                app.ui.panel.show();
                layer.open({
                    type: 1,
                    title: "上传文件",
                    closeBtn: 1,
                    area: ['441px', '505px'],
                    scrollbar: false,
                    content: $("#FilePanel"),
                    end: function () {
                        app.ui.panel.hide();
                    }
                });
            });
        });
    </script>
</head>

<body>
<p>up6多文件上传演示页面</p>
<p><a href="/up6/clear" target="_blank">清空数据库</a></p>
<p><a href="/filemgr/index" target="_blank">文件管理器示例</a></p>
<p><a href="/up6/panel" target="_blank">单面板示例</a></p>
<p><a href="/up6/single" target="_blank">单文件示例</a></p>
<p><a href="vue/index.jsp" target="_blank">vue示例</a></p>
<p><a href="/down2/index" target="_blank">文件下载示例</a></p>
<p><a href="/down2/ligerui" target="_blank">ligerui下载示例</a></p>
<input id="open-dlg" type="button" value="打开上传窗口" />
<div id="FilePanel" style="display: none;"></div>
<div id="msg"></div>
</body>
</html>